function ds = synapse(s,tau_r,tau_d,V_pre)
%ds returns the dynamics of a synapse
%   input the s variable, time constant for rise and decay, and pre-
%   synaptic voltage.

ds = (-s/tau_d)+(((1-s)/tau_r)*(1+tanh(V_pre/10)));

end

